#ifndef CInetH
#define CInetH

#include <Forms.hpp> //pour TCustomForm
//---------------------------------------------------------------------------
typedef BOOL WINAPI ( *TInternetAutodial)( DWORD dwFlags, HWND hwndParent);
typedef BOOL WINAPI ( *TInternetAutodialHangup)( DWORD dwReserved);
typedef BOOL WINAPI ( *TInternetGetConnectedState)( LPDWORD lpdwFlags, DWORD dwReserved);
//---------------------------------------------------------------------------
class PACKAGE CInternet
{
  private:
    HINSTANCE                  m_hWininet;
    TInternetAutodial          m_pfncInternetAutodial;
    TInternetAutodialHangup    m_pfncInternetAutodialHangup;
    TInternetGetConnectedState m_pfncInternetGetConnectedState;
    bool                       m_ConnexionInterne;
    TCustomForm               *m_pParentForm;

    bool IsConnected();

  public:
    __fastcall  CInternet();
    virtual __fastcall ~CInternet( void);

    bool __fastcall Connect(TCustomForm *pParentForm);
    void __fastcall Disconnect( void);

    __property bool Connected = { read=IsConnected};
};

#endif
